What are the different methods available under sqlcommand class to access the data? Sumit Kesarwani238027-Jan-2014c#c# Updated on 15-Sep-2020
Sumit Kesarwani
27-Jan-2014ExecuteReader - Used where one or more records are returned - SELECT Query.
ExecuteNonQuery - Used where it affects a state of the table and no data is being queried - INSERT, UPDATE, DELETE, CREATE and SET queries.
ExecuteScalar - Used where it returns a single record.